package zhh.tangbao.system.utils;

import org.springframework.stereotype.Component;
import zhh.tangbao.user.vo.UserVo;
import zhh.tangbao.wechat.vo.WeChatUserCacheVo;

/**
 * 2023/2/27
 * @author 粥灰灰
 * @version 1.0
 * 描述
 */

@Component
public class WeChatUserHolderUtil {
    private final ThreadLocal<WeChatUserCacheVo> local = new ThreadLocal<>();
    public void setCurrentUser(WeChatUserCacheVo user) {
        local.set(user);
    }

    public WeChatUserCacheVo getCurrentUser() {
        return local.get();
    }
}
